package com.shanzmoo.admin.web;

import com.shanzmoo.base.bean.PageRespBase;
import com.shanzmoo.base.bean.SHttpResponse;
import com.shanzmoo.db.report.entity.dto.DataReportQueryDto;
import com.shanzmoo.db.report.entity.vo.DataReportVo;
import com.shanzmoo.db.report.service.IDataReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 报表-报表管理
 *
 * @author: Gzhao 2020/12/22
 */
@Api(tags = "统计-报表管理")
@RestController
@RequestMapping("/api/report")
public class DataReportController {

    @Autowired
    private IDataReportService dataReportService;

    @ApiOperation(value = "分页列表")
    @PostMapping("/pageList")
    public SHttpResponse<PageRespBase<DataReportVo>> pageList(@Valid @RequestBody DataReportQueryDto queryDto) {
        PageRespBase<DataReportVo> re = dataReportService.getPageList(queryDto);
        return SHttpResponse.ok(re);
    }
}
